<?php
require('config.php');

        $user_id=$_REQUEST['user_id'];
        $goods_id=$_REQUEST['goods_id'];
		$sql="select * from `".$oto."_users` where `userId`='".$user_id."' LIMIT 1";
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$user_info[]=$row;//将取得的所有数据赋值给person_info数组
		}
		$data[0]['userScore']=$user_info[0]['userScore'];
		if($user_info[0]['payPwd']==NULL || $user_info[0]['payPwd']=="" || is_null($user_info[0]['payPwd']))
		{
			$data[0]['payPwd']=0;
		}
		else
		{
			$data[0]['payPwd']=1;
		}
		$sql="select * from `".$oto."_integral` where `goodsId`='".$goods_id."' LIMIT 1";
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$jf_goods_info[]=$row;//将取得的所有数据赋值给person_info数组
		}
		$data[0]['needPay']=$jf_goods_info[0]['marketPrice'];
		$data[0]['score']=$jf_goods_info[0]['shopPrice'];
		$data[0]['goodsName']=$jf_goods_info[0]['goodsName'];
		$data[0]['goodsImg']=$jf_goods_info[0]['goodsImg'];
		$data[0]['goodsStock']=$jf_goods_info[0]['goodsStock'];
		$data[0]['isSale']=$jf_goods_info[0]['isSale'];
		//file_put_contents("tsxx.txt", "\r\n".111."\r\n", FILE_APPEND);
		echo json_encode($data);
?>